﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class HelpWindow : MonoBehaviour {

    const string key_tipWindow = "key_tipWindow";

    public Button _btn_ok;

	// Use this for initialization
	void Start () {
        gameObject.SetActive(false);
        if (!PlayerPrefs.HasKey(key_tipWindow))
        {
            //gameObject.SetActive(true);

            _btn_ok.onClick.AddListener(() => {
                gameObject.SetActive(false);
            });

            PlayerPrefs.SetString(key_tipWindow, key_tipWindow);

            Invoke("HideSelf", 10f);
        }

    }

    void HideSelf()
    {
        gameObject.SetActive(false);
    }
}
